/**
* Copyright (c) 2014 - 2017 Qualcomm Technologies International, Ltd.
 * \file cvc_send_cap.h
 */

#ifndef CVC_SEND_CAP_ASM_H
#define CVC_SEND_CAP_ASM_H

/*Temporary macro for debug purposes. */
#ifndef DEBUG_MODE
  #define CALL_PANIC_OR_JUMP(x) jump x
#else
  #define CALL_PANIC_OR_JUMP(x) call $error 
#endif

/* Description for Operator Data Structure */

/* Set From Dynamic Loader */
.CONST   $CVC_SEND_CAP.ROOT.INST_ALLOC_PTR_FIELD               0*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.SCRATCH_ALLOC_PTR_FIELD            1*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.REF_INPUT_STREAM_MAP_PTR_FIELD     2*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.LEFT_INPUT_STREAM_MAP_PTR_FIELD    3*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.RIGHT_INPUT_STREAM_MAP_PTR_FIELD   4*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.MIC3_INPUT_STREAM_MAP_PTR_FIELD    5*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.MIC4_INPUT_STREAM_MAP_PTR_FIELD    6*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.OUTPUT_STREAM_MAP_PTR_FIELD        7*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.MODE_TABLE_PTR_FIELD               8*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.INIT_TABLE_PTR_FIELD               9*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.CVC_DATA_ROOT_FIELD               10*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.STATUS_TABLE_PTR_FIELD            11*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.PARAMS_PTR_FIELD                  12*ADDR_PER_WORD;

/* Shared Variables (Set Before dynamic load) */
.CONST   $CVC_SEND_CAP.ROOT.CVCLIB_TABLE                      13*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.FFTSPLIT_TABLE                    14*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.OMS_CONST                         15*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.DMS100_MODE                       16*ADDR_PER_WORD;  
.CONST   $CVC_SEND_CAP.ROOT.ASF_MODE_TABLE                    17*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.VAD_DC_COEFFS                     18*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.AEC_MODE                          19*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.FILTERBANK_CONFIG                 20*ADDR_PER_WORD;  


.CONST   $CVC_SEND_CAP.ROOT.CUR_MODE_PTR_FIELD                21*ADDR_PER_WORD;
.CONST   $CVC_SEND_CAP.ROOT.NDVC_SHARE_PTR_FIELD              22*ADDR_PER_WORD;

// State Info
.CONST   $CVC_SEND_CAP.ROOT.MGDC_STATE_FIELD                  23*ADDR_PER_WORD; 
.CONST   $CVC_SEND_CAP.ROOT.MGDC_STATE_PTR_FIELD              24*ADDR_PER_WORD;

// Misc Control Data
.CONST  $CVC_SEND_CAP.ROOT.ALL_CONNECTED                       25*ADDR_PER_WORD;
.CONST  $CVC_SEND_CAP.ROOT.CAPABILITY_ID                  26*ADDR_PER_WORD;
.CONST  $CVC_SEND_CAP.ROOT.HOST_MODE                      27*ADDR_PER_WORD; 
.CONST  $CVC_SEND_CAP.ROOT.OBPM_MODE                      28*ADDR_PER_WORD;  
.CONST  $CVC_SEND_CAP.ROOT.OVR_CONTROL                    29*ADDR_PER_WORD; 
.CONST  $CVC_SEND_CAP.ROOT.ALGREINIT                      30*ADDR_PER_WORD; 
 
.CONST  $CVC_SEND_CAP.ROOT.IS_WIDEBAND                    31*ADDR_PER_WORD; 

.CONST  $CVC_SEND_CAP.ROOT.CUR_MODE                       32*ADDR_PER_WORD;  
.CONST  $CVC_SEND_CAP.ROOT.DATA_VARIANT                   33*ADDR_PER_WORD; 
.CONST  $CVC_SEND_CAP.ROOT.MAJOR_CONFIG                   34*ADDR_PER_WORD; 
.CONST  $CVC_SEND_CAP.ROOT.NUM_MICS                       35*ADDR_PER_WORD; 
.CONST  $CVC_SEND_CAP.ROOT.MIC_CONFIG                     36*ADDR_PER_WORD; 
.CONST  $CVC_SEND_CAP.ROOT.CAP_DATA                       37*ADDR_PER_WORD; 
.CONST  $CVC_SEND_CAP.ROOT.DYN_MAIN                       38*ADDR_PER_WORD; 
.CONST  $CVC_SEND_CAP.ROOT.DYN_LINKER                     39*ADDR_PER_WORD; 

.CONST  $CVC_SEND_CAP.ROOT.MUTE_CONTROL_PTR               40*ADDR_PER_WORD;
.CONST  $CVC_SEND_CAP.ROOT.HOST_MUTE                      41*ADDR_PER_WORD;
.CONST  $CVC_SEND_CAP.ROOT.OBPM_MUTE                      42*ADDR_PER_WORD;

.CONST  $CVC_SEND_CAP.ROOT.CURRENT_MUTE                   43*ADDR_PER_WORD;

//super wideband resampler related
.CONST  $CVC_SEND_CAP.ROOT.DOWNSAMPLE_CONFIG_FIELD        44*ADDR_PER_WORD;
.CONST  $CVC_SEND_CAP.ROOT.UPSAMPLE_CONFIG_FIELD          45*ADDR_PER_WORD;

.CONST  $CVC_SEND_CAP.ROOT.FRAME_SIZE_FIELD               46*ADDR_PER_WORD;
.CONST  $CVC_SEND_CAP.ROOT.SAMPLE_RATE_FIELD              47*ADDR_PER_WORD;
.CONST  $CVC_SEND_CAP.ROOT.OMNI_MODE_HOST_FIELD           48*ADDR_PER_WORD;
.CONST  $CVC_SEND_CAP.ROOT.OMNI_MODE_OBPM_FIELD           49*ADDR_PER_WORD;
.CONST  $CVC_SEND_CAP.ROOT.OMNI_MODE_PTR_FIELD            50*ADDR_PER_WORD;

.CONST  $CVC_SEND_CAP.ROOT.SECURITY.KEY_FIELD             51*ADDR_PER_WORD;

.CONST  $CVC_SEND_CAP.ROOT.PARMS_DEF_FIELD                53*ADDR_PER_WORD; //Secure Data is 2 words


// ---  Use cases --------------------------------------
.CONST $cvc_send.HEADSET                    0;
.CONST $cvc_send.SPEAKER                    1;
.CONST $cvc_send.AUTO                       2;

#define DATA_VARIANT_NB   0
#define DATA_VARIANT_WB   1
#define DATA_VARIANT_UWB  2
#define DATA_VARIANT_SWB  3
#define DATA_VARIANT_FB   4

#define MIC_CONFIG_DEFAULT                   0
#define MIC_CONFIG_ENDFIRE                   1
#define MIC_CONFIG_BROADSIDE                 2

#endif
